<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: hardware_powman</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.1.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__hardware__powman.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">hardware_powman<div class="ingroups"><a class="el" href="group__hardware.html">Hardware APIs</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Power Management API.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gace732bfd97b0762a2903cf7e32606e32"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#gace732bfd97b0762a2903cf7e32606e32">powman_power_domains</a> { <br />
&#160;&#160;<a class="el" href="group__hardware__powman.html#ggace732bfd97b0762a2903cf7e32606e32a00c076ec026ca9c1e0c2ab8502705382">POWMAN_POWER_DOMAIN_SRAM_BANK1</a> = 0
, <a class="el" href="group__hardware__powman.html#ggace732bfd97b0762a2903cf7e32606e32a0cf27623a721de09d60d6cd506911666">POWMAN_POWER_DOMAIN_SRAM_BANK0</a> = 1
, <a class="el" href="group__hardware__powman.html#ggace732bfd97b0762a2903cf7e32606e32a100701ea934dc58c777c020cd8b766c0">POWMAN_POWER_DOMAIN_XIP_CACHE</a> = 2
, <a class="el" href="group__hardware__powman.html#ggace732bfd97b0762a2903cf7e32606e32a37ba2cba72976391dc9d83c66cfef3c5">POWMAN_POWER_DOMAIN_SWITCHED_CORE</a> = 3
, <br />
&#160;&#160;<b>POWMAN_POWER_DOMAIN_COUNT</b> = 4
<br />
 }</td></tr>
<tr class="memdesc:gace732bfd97b0762a2903cf7e32606e32"><td class="mdescLeft">&#160;</td><td class="mdescRight">Power domains of powman.  <a href="group__hardware__powman.html#gace732bfd97b0762a2903cf7e32606e32">More...</a><br /></td></tr>
<tr class="separator:gace732bfd97b0762a2903cf7e32606e32"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2659af7a723a142b57a72add489d4f4e"><td class="memItemLeft" align="right" valign="top"><a id="ga2659af7a723a142b57a72add489d4f4e" name="ga2659af7a723a142b57a72add489d4f4e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>powman_timer_set_1khz_tick_source_lposc</b> (void)</td></tr>
<tr class="memdesc:ga2659af7a723a142b57a72add489d4f4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use the ~32KHz low power oscillator as the powman timer source. <br /></td></tr>
<tr class="separator:ga2659af7a723a142b57a72add489d4f4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacc08f760516b1b09a58a7121cdfc1f49"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#gacc08f760516b1b09a58a7121cdfc1f49">powman_timer_set_1khz_tick_source_lposc_with_hz</a> (uint32_t lposc_freq_hz)</td></tr>
<tr class="memdesc:gacc08f760516b1b09a58a7121cdfc1f49"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use the low power oscillator (specifying frequency) as the powman timer source.  <a href="group__hardware__powman.html#gacc08f760516b1b09a58a7121cdfc1f49">More...</a><br /></td></tr>
<tr class="separator:gacc08f760516b1b09a58a7121cdfc1f49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9ee3b6c28b8b24f3c22022b757082448"><td class="memItemLeft" align="right" valign="top"><a id="ga9ee3b6c28b8b24f3c22022b757082448" name="ga9ee3b6c28b8b24f3c22022b757082448"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>powman_timer_set_1khz_tick_source_xosc</b> (void)</td></tr>
<tr class="memdesc:ga9ee3b6c28b8b24f3c22022b757082448"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use the crystal oscillator as the powman timer source. <br /></td></tr>
<tr class="separator:ga9ee3b6c28b8b24f3c22022b757082448"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8fb8797fc3fbc9b7e9c30c6ae316065c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#ga8fb8797fc3fbc9b7e9c30c6ae316065c">powman_timer_set_1khz_tick_source_xosc_with_hz</a> (uint32_t xosc_freq_hz)</td></tr>
<tr class="memdesc:ga8fb8797fc3fbc9b7e9c30c6ae316065c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use the crystal oscillator as the powman timer source.  <a href="group__hardware__powman.html#ga8fb8797fc3fbc9b7e9c30c6ae316065c">More...</a><br /></td></tr>
<tr class="separator:ga8fb8797fc3fbc9b7e9c30c6ae316065c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7e0048a9fe486dc4e6cc6b9ae7699924"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#ga7e0048a9fe486dc4e6cc6b9ae7699924">powman_timer_set_1khz_tick_source_gpio</a> (uint32_t gpio)</td></tr>
<tr class="memdesc:ga7e0048a9fe486dc4e6cc6b9ae7699924"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use a 1KHz external tick as the powman timer source.  <a href="group__hardware__powman.html#ga7e0048a9fe486dc4e6cc6b9ae7699924">More...</a><br /></td></tr>
<tr class="separator:ga7e0048a9fe486dc4e6cc6b9ae7699924"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4b843b70eaf83fb4b0d2fbee8ce1a015"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#ga4b843b70eaf83fb4b0d2fbee8ce1a015">powman_timer_enable_gpio_1hz_sync</a> (uint32_t gpio)</td></tr>
<tr class="memdesc:ga4b843b70eaf83fb4b0d2fbee8ce1a015"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use a 1Hz external signal as the powman timer source for seconds only.  <a href="group__hardware__powman.html#ga4b843b70eaf83fb4b0d2fbee8ce1a015">More...</a><br /></td></tr>
<tr class="separator:ga4b843b70eaf83fb4b0d2fbee8ce1a015"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5b035f3737ec4d2261414e931c5a8de3"><td class="memItemLeft" align="right" valign="top"><a id="ga5b035f3737ec4d2261414e931c5a8de3" name="ga5b035f3737ec4d2261414e931c5a8de3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>powman_timer_disable_gpio_1hz_sync</b> (void)</td></tr>
<tr class="memdesc:ga5b035f3737ec4d2261414e931c5a8de3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop using 1Hz external signal as the powman timer source for seconds. <br /></td></tr>
<tr class="separator:ga5b035f3737ec4d2261414e931c5a8de3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7dc3aafeae8ba5a29f67970454d38046"><td class="memItemLeft" align="right" valign="top"><a id="ga7dc3aafeae8ba5a29f67970454d38046" name="ga7dc3aafeae8ba5a29f67970454d38046"></a>
uint64_t&#160;</td><td class="memItemRight" valign="bottom"><b>powman_timer_get_ms</b> (void)</td></tr>
<tr class="memdesc:ga7dc3aafeae8ba5a29f67970454d38046"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns current time in ms. <br /></td></tr>
<tr class="separator:ga7dc3aafeae8ba5a29f67970454d38046"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa2f30fea7e5b78efc2d89cf5e5f215ed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#gaa2f30fea7e5b78efc2d89cf5e5f215ed">powman_timer_set_ms</a> (uint64_t time_ms)</td></tr>
<tr class="memdesc:gaa2f30fea7e5b78efc2d89cf5e5f215ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set current time in ms.  <a href="group__hardware__powman.html#gaa2f30fea7e5b78efc2d89cf5e5f215ed">More...</a><br /></td></tr>
<tr class="separator:gaa2f30fea7e5b78efc2d89cf5e5f215ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac8aa99d990fc2e793c2cc3ff680ce41f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#gac8aa99d990fc2e793c2cc3ff680ce41f">powman_timer_enable_alarm_at_ms</a> (uint64_t alarm_time_ms)</td></tr>
<tr class="memdesc:gac8aa99d990fc2e793c2cc3ff680ce41f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set an alarm at an absolute time in ms.  <a href="group__hardware__powman.html#gac8aa99d990fc2e793c2cc3ff680ce41f">More...</a><br /></td></tr>
<tr class="separator:gac8aa99d990fc2e793c2cc3ff680ce41f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf78bad976be73c9480933d73bf358a23"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#gaf78bad976be73c9480933d73bf358a23">powman_timer_disable_alarm</a> (void)</td></tr>
<tr class="memdesc:gaf78bad976be73c9480933d73bf358a23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable the alarm.  <a href="group__hardware__powman.html#gaf78bad976be73c9480933d73bf358a23">More...</a><br /></td></tr>
<tr class="separator:gaf78bad976be73c9480933d73bf358a23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8bb53e1b2c3e5a553aedfbff18d35a50"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#ga8bb53e1b2c3e5a553aedfbff18d35a50">powman_set_bits</a> (volatile uint32_t *reg, uint32_t bits)</td></tr>
<tr class="memdesc:ga8bb53e1b2c3e5a553aedfbff18d35a50"><td class="mdescLeft">&#160;</td><td class="mdescRight">hw_set_bits helper function  <a href="group__hardware__powman.html#ga8bb53e1b2c3e5a553aedfbff18d35a50">More...</a><br /></td></tr>
<tr class="separator:ga8bb53e1b2c3e5a553aedfbff18d35a50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5fe0817fd5f0baaefe9e086705e3b4e8"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#ga5fe0817fd5f0baaefe9e086705e3b4e8">powman_clear_bits</a> (volatile uint32_t *reg, uint32_t bits)</td></tr>
<tr class="memdesc:ga5fe0817fd5f0baaefe9e086705e3b4e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">hw_clear_bits helper function  <a href="group__hardware__powman.html#ga5fe0817fd5f0baaefe9e086705e3b4e8">More...</a><br /></td></tr>
<tr class="separator:ga5fe0817fd5f0baaefe9e086705e3b4e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6e2dd3c584d9eb2a40202b6d2dbddccd"><td class="memItemLeft" align="right" valign="top"><a id="ga6e2dd3c584d9eb2a40202b6d2dbddccd" name="ga6e2dd3c584d9eb2a40202b6d2dbddccd"></a>
static bool&#160;</td><td class="memItemRight" valign="bottom"><b>powman_timer_is_running</b> (void)</td></tr>
<tr class="memdesc:ga6e2dd3c584d9eb2a40202b6d2dbddccd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if the powman timer is running. <br /></td></tr>
<tr class="separator:ga6e2dd3c584d9eb2a40202b6d2dbddccd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7d6d9931a08e2999606e434ae7681fc6"><td class="memItemLeft" align="right" valign="top"><a id="ga7d6d9931a08e2999606e434ae7681fc6" name="ga7d6d9931a08e2999606e434ae7681fc6"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>powman_timer_stop</b> (void)</td></tr>
<tr class="memdesc:ga7d6d9931a08e2999606e434ae7681fc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop the powman timer. <br /></td></tr>
<tr class="separator:ga7d6d9931a08e2999606e434ae7681fc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0002ace8105882f2ed726fdf2bd2a284"><td class="memItemLeft" align="right" valign="top"><a id="ga0002ace8105882f2ed726fdf2bd2a284" name="ga0002ace8105882f2ed726fdf2bd2a284"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>powman_timer_start</b> (void)</td></tr>
<tr class="memdesc:ga0002ace8105882f2ed726fdf2bd2a284"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the powman timer. <br /></td></tr>
<tr class="separator:ga0002ace8105882f2ed726fdf2bd2a284"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4c25eb6c57761d12e74c196082be405d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#ga4c25eb6c57761d12e74c196082be405d">powman_clear_alarm</a> (void)</td></tr>
<tr class="memdesc:ga4c25eb6c57761d12e74c196082be405d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the powman alarm.  <a href="group__hardware__powman.html#ga4c25eb6c57761d12e74c196082be405d">More...</a><br /></td></tr>
<tr class="separator:ga4c25eb6c57761d12e74c196082be405d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac665005a92a55a827ac9aafac7a3e42d"><td class="memItemLeft" align="right" valign="top"><a id="gac665005a92a55a827ac9aafac7a3e42d" name="gac665005a92a55a827ac9aafac7a3e42d"></a>
powman_power_state&#160;</td><td class="memItemRight" valign="bottom"><b>powman_get_power_state</b> (void)</td></tr>
<tr class="memdesc:gac665005a92a55a827ac9aafac7a3e42d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current power state. <br /></td></tr>
<tr class="separator:gac665005a92a55a827ac9aafac7a3e42d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga37324a8d6e9b4416a1e8837cbca44275"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#ga37324a8d6e9b4416a1e8837cbca44275">powman_set_power_state</a> (powman_power_state state)</td></tr>
<tr class="memdesc:ga37324a8d6e9b4416a1e8837cbca44275"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the power state.  <a href="group__hardware__powman.html#ga37324a8d6e9b4416a1e8837cbca44275">More...</a><br /></td></tr>
<tr class="separator:ga37324a8d6e9b4416a1e8837cbca44275"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf734b0aa9b100eedc4a923e97777bb55"><td class="memItemLeft" align="right" valign="top">static powman_power_state&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#gaf734b0aa9b100eedc4a923e97777bb55">powman_power_state_with_domain_on</a> (powman_power_state orig, enum <a class="el" href="group__hardware__powman.html#gace732bfd97b0762a2903cf7e32606e32">powman_power_domains</a> domain)</td></tr>
<tr class="memdesc:gaf734b0aa9b100eedc4a923e97777bb55"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper function modify a powman_power_state to turn a domain on.  <a href="group__hardware__powman.html#gaf734b0aa9b100eedc4a923e97777bb55">More...</a><br /></td></tr>
<tr class="separator:gaf734b0aa9b100eedc4a923e97777bb55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf203861a11946a64fefcab10288aa2fd"><td class="memItemLeft" align="right" valign="top">static powman_power_state&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#gaf203861a11946a64fefcab10288aa2fd">powman_power_state_with_domain_off</a> (powman_power_state orig, enum <a class="el" href="group__hardware__powman.html#gace732bfd97b0762a2903cf7e32606e32">powman_power_domains</a> domain)</td></tr>
<tr class="memdesc:gaf203861a11946a64fefcab10288aa2fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper function modify a powman_power_state to turn a domain off.  <a href="group__hardware__powman.html#gaf203861a11946a64fefcab10288aa2fd">More...</a><br /></td></tr>
<tr class="separator:gaf203861a11946a64fefcab10288aa2fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3367f89af96ca94b74d521a962db4685"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#ga3367f89af96ca94b74d521a962db4685">powman_power_state_is_domain_on</a> (powman_power_state state, enum <a class="el" href="group__hardware__powman.html#gace732bfd97b0762a2903cf7e32606e32">powman_power_domains</a> domain)</td></tr>
<tr class="memdesc:ga3367f89af96ca94b74d521a962db4685"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper function to check if a domain is on in a given powman_power_state.  <a href="group__hardware__powman.html#ga3367f89af96ca94b74d521a962db4685">More...</a><br /></td></tr>
<tr class="separator:ga3367f89af96ca94b74d521a962db4685"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga284eb8137db4f4aa0ef21f52f2cd0f0a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#ga284eb8137db4f4aa0ef21f52f2cd0f0a">powman_enable_alarm_wakeup_at_ms</a> (uint64_t alarm_time_ms)</td></tr>
<tr class="memdesc:ga284eb8137db4f4aa0ef21f52f2cd0f0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wake up from an alarm at a given time.  <a href="group__hardware__powman.html#ga284eb8137db4f4aa0ef21f52f2cd0f0a">More...</a><br /></td></tr>
<tr class="separator:ga284eb8137db4f4aa0ef21f52f2cd0f0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd8304302bd7e666f73f5b08bdf2b110"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#gabd8304302bd7e666f73f5b08bdf2b110">powman_enable_gpio_wakeup</a> (uint gpio_wakeup_num, uint32_t gpio, bool edge, bool high)</td></tr>
<tr class="memdesc:gabd8304302bd7e666f73f5b08bdf2b110"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wake up from a gpio.  <a href="group__hardware__powman.html#gabd8304302bd7e666f73f5b08bdf2b110">More...</a><br /></td></tr>
<tr class="separator:gabd8304302bd7e666f73f5b08bdf2b110"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga63fbf4b74797ee6f7ef1f9b103200b8e"><td class="memItemLeft" align="right" valign="top"><a id="ga63fbf4b74797ee6f7ef1f9b103200b8e" name="ga63fbf4b74797ee6f7ef1f9b103200b8e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>powman_disable_alarm_wakeup</b> (void)</td></tr>
<tr class="memdesc:ga63fbf4b74797ee6f7ef1f9b103200b8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable waking up from alarm. <br /></td></tr>
<tr class="separator:ga63fbf4b74797ee6f7ef1f9b103200b8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf61ade848ee36a39b2389cc21d112132"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#gaf61ade848ee36a39b2389cc21d112132">powman_disable_gpio_wakeup</a> (uint gpio_wakeup_num)</td></tr>
<tr class="memdesc:gaf61ade848ee36a39b2389cc21d112132"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable wake up from a gpio.  <a href="group__hardware__powman.html#gaf61ade848ee36a39b2389cc21d112132">More...</a><br /></td></tr>
<tr class="separator:gaf61ade848ee36a39b2389cc21d112132"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacd0efe4dd2bdc07d5307bdae4fa24af6"><td class="memItemLeft" align="right" valign="top"><a id="gacd0efe4dd2bdc07d5307bdae4fa24af6" name="gacd0efe4dd2bdc07d5307bdae4fa24af6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>powman_disable_all_wakeups</b> (void)</td></tr>
<tr class="memdesc:gacd0efe4dd2bdc07d5307bdae4fa24af6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable all wakeup sources. <br /></td></tr>
<tr class="separator:gacd0efe4dd2bdc07d5307bdae4fa24af6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8b055fd9bd2a7704c6ada5e903b5eecd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#ga8b055fd9bd2a7704c6ada5e903b5eecd">powman_configure_wakeup_state</a> (powman_power_state sleep_state, powman_power_state wakeup_state)</td></tr>
<tr class="memdesc:ga8b055fd9bd2a7704c6ada5e903b5eecd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure sleep state and wakeup state.  <a href="group__hardware__powman.html#ga8b055fd9bd2a7704c6ada5e903b5eecd">More...</a><br /></td></tr>
<tr class="separator:ga8b055fd9bd2a7704c6ada5e903b5eecd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga268335a57afa4f047a780b0e38c43876"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__powman.html#ga268335a57afa4f047a780b0e38c43876">powman_set_debug_power_request_ignored</a> (bool ignored)</td></tr>
<tr class="memdesc:ga268335a57afa4f047a780b0e38c43876"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ignore wake up when the debugger is attached.  <a href="group__hardware__powman.html#ga268335a57afa4f047a780b0e38c43876">More...</a><br /></td></tr>
<tr class="separator:ga268335a57afa4f047a780b0e38c43876"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p >Power Management API. </p>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="gace732bfd97b0762a2903cf7e32606e32" name="gace732bfd97b0762a2903cf7e32606e32"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gace732bfd97b0762a2903cf7e32606e32">&#9670;&nbsp;</a></span>powman_power_domains</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__hardware__powman.html#gace732bfd97b0762a2903cf7e32606e32">powman_power_domains</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Power domains of powman. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggace732bfd97b0762a2903cf7e32606e32a00c076ec026ca9c1e0c2ab8502705382" name="ggace732bfd97b0762a2903cf7e32606e32a00c076ec026ca9c1e0c2ab8502705382"></a>POWMAN_POWER_DOMAIN_SRAM_BANK1&#160;</td><td class="fielddoc"><p >bank1 includes the top 256K of sram plus sram 8 and 9 (scratch x and scratch y) </p>
</td></tr>
<tr><td class="fieldname"><a id="ggace732bfd97b0762a2903cf7e32606e32a0cf27623a721de09d60d6cd506911666" name="ggace732bfd97b0762a2903cf7e32606e32a0cf27623a721de09d60d6cd506911666"></a>POWMAN_POWER_DOMAIN_SRAM_BANK0&#160;</td><td class="fielddoc"><p >bank0 is bottom 256K of sSRAM </p>
</td></tr>
<tr><td class="fieldname"><a id="ggace732bfd97b0762a2903cf7e32606e32a100701ea934dc58c777c020cd8b766c0" name="ggace732bfd97b0762a2903cf7e32606e32a100701ea934dc58c777c020cd8b766c0"></a>POWMAN_POWER_DOMAIN_XIP_CACHE&#160;</td><td class="fielddoc"><p >XIP cache is 2x8K instances. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggace732bfd97b0762a2903cf7e32606e32a37ba2cba72976391dc9d83c66cfef3c5" name="ggace732bfd97b0762a2903cf7e32606e32a37ba2cba72976391dc9d83c66cfef3c5"></a>POWMAN_POWER_DOMAIN_SWITCHED_CORE&#160;</td><td class="fielddoc"><p >Switched core logic (processors, busfabric, peris etc) </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga4c25eb6c57761d12e74c196082be405d" name="ga4c25eb6c57761d12e74c196082be405d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4c25eb6c57761d12e74c196082be405d">&#9670;&nbsp;</a></span>powman_clear_alarm()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void powman_clear_alarm </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clears the powman alarm. </p>
<p >Note, the alarm must be disabled (see <a class="el" href="group__hardware__powman.html#gaf78bad976be73c9480933d73bf358a23">powman_timer_disable_alarm</a>) before clearing the alarm, as the alarm fires if the time is greater than equal to the target, so once the time has passed the alarm will always fire while enabled. </p>

</div>
</div>
<a id="ga5fe0817fd5f0baaefe9e086705e3b4e8" name="ga5fe0817fd5f0baaefe9e086705e3b4e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5fe0817fd5f0baaefe9e086705e3b4e8">&#9670;&nbsp;</a></span>powman_clear_bits()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void powman_clear_bits </td>
          <td>(</td>
          <td class="paramtype">volatile uint32_t *&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bits</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>hw_clear_bits helper function </p>
<p >Powman needs a password for writes, to prevent accidentally writing to it. This function implements hw_clear_bits with an appropriate password.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reg</td><td>register to clear </td></tr>
    <tr><td class="paramname">bits</td><td>bits of register to clear </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8b055fd9bd2a7704c6ada5e903b5eecd" name="ga8b055fd9bd2a7704c6ada5e903b5eecd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8b055fd9bd2a7704c6ada5e903b5eecd">&#9670;&nbsp;</a></span>powman_configure_wakeup_state()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool powman_configure_wakeup_state </td>
          <td>(</td>
          <td class="paramtype">powman_power_state&#160;</td>
          <td class="paramname"><em>sleep_state</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">powman_power_state&#160;</td>
          <td class="paramname"><em>wakeup_state</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configure sleep state and wakeup state. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sleep_state</td><td>power state powman will go to when sleeping, used to validate the wakeup state </td></tr>
    <tr><td class="paramname">wakeup_state</td><td>power state powman will go to when waking up. Note switched core and xip always power up. SRAM bank0 and bank1 can be left powered off </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the state is valid, false if not </dd></dl>

</div>
</div>
<a id="gaf61ade848ee36a39b2389cc21d112132" name="gaf61ade848ee36a39b2389cc21d112132"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf61ade848ee36a39b2389cc21d112132">&#9670;&nbsp;</a></span>powman_disable_gpio_wakeup()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void powman_disable_gpio_wakeup </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gpio_wakeup_num</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disable wake up from a gpio. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gpio_wakeup_num</td><td>hardware wakeup instance to use (0-3) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga284eb8137db4f4aa0ef21f52f2cd0f0a" name="ga284eb8137db4f4aa0ef21f52f2cd0f0a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga284eb8137db4f4aa0ef21f52f2cd0f0a">&#9670;&nbsp;</a></span>powman_enable_alarm_wakeup_at_ms()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void powman_enable_alarm_wakeup_at_ms </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>alarm_time_ms</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Wake up from an alarm at a given time. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">alarm_time_ms</td><td>time to wake up in ms </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gabd8304302bd7e666f73f5b08bdf2b110" name="gabd8304302bd7e666f73f5b08bdf2b110"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabd8304302bd7e666f73f5b08bdf2b110">&#9670;&nbsp;</a></span>powman_enable_gpio_wakeup()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void powman_enable_gpio_wakeup </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gpio_wakeup_num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>gpio</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>edge</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>high</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Wake up from a gpio. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gpio_wakeup_num</td><td>hardware wakeup instance to use (0-3) </td></tr>
    <tr><td class="paramname">gpio</td><td>gpio to wake up from (0-47) </td></tr>
    <tr><td class="paramname">edge</td><td>true for edge sensitive, false for level sensitive </td></tr>
    <tr><td class="paramname">high</td><td>true for active high, false active low </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga3367f89af96ca94b74d521a962db4685" name="ga3367f89af96ca94b74d521a962db4685"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3367f89af96ca94b74d521a962db4685">&#9670;&nbsp;</a></span>powman_power_state_is_domain_on()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool powman_power_state_is_domain_on </td>
          <td>(</td>
          <td class="paramtype">powman_power_state&#160;</td>
          <td class="paramname"><em>state</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum <a class="el" href="group__hardware__powman.html#gace732bfd97b0762a2903cf7e32606e32">powman_power_domains</a>&#160;</td>
          <td class="paramname"><em>domain</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Helper function to check if a domain is on in a given powman_power_state. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">state</td><td>powman_power_state </td></tr>
    <tr><td class="paramname">domain</td><td>domain to check is on </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf203861a11946a64fefcab10288aa2fd" name="gaf203861a11946a64fefcab10288aa2fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf203861a11946a64fefcab10288aa2fd">&#9670;&nbsp;</a></span>powman_power_state_with_domain_off()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static powman_power_state powman_power_state_with_domain_off </td>
          <td>(</td>
          <td class="paramtype">powman_power_state&#160;</td>
          <td class="paramname"><em>orig</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum <a class="el" href="group__hardware__powman.html#gace732bfd97b0762a2903cf7e32606e32">powman_power_domains</a>&#160;</td>
          <td class="paramname"><em>domain</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Helper function modify a powman_power_state to turn a domain off. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">orig</td><td>original state </td></tr>
    <tr><td class="paramname">domain</td><td>domain to turn off </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf734b0aa9b100eedc4a923e97777bb55" name="gaf734b0aa9b100eedc4a923e97777bb55"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf734b0aa9b100eedc4a923e97777bb55">&#9670;&nbsp;</a></span>powman_power_state_with_domain_on()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static powman_power_state powman_power_state_with_domain_on </td>
          <td>(</td>
          <td class="paramtype">powman_power_state&#160;</td>
          <td class="paramname"><em>orig</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">enum <a class="el" href="group__hardware__powman.html#gace732bfd97b0762a2903cf7e32606e32">powman_power_domains</a>&#160;</td>
          <td class="paramname"><em>domain</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Helper function modify a powman_power_state to turn a domain on. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">orig</td><td>original state </td></tr>
    <tr><td class="paramname">domain</td><td>domain to turn on </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8bb53e1b2c3e5a553aedfbff18d35a50" name="ga8bb53e1b2c3e5a553aedfbff18d35a50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8bb53e1b2c3e5a553aedfbff18d35a50">&#9670;&nbsp;</a></span>powman_set_bits()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void powman_set_bits </td>
          <td>(</td>
          <td class="paramtype">volatile uint32_t *&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bits</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>hw_set_bits helper function </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reg</td><td>register to set </td></tr>
    <tr><td class="paramname">bits</td><td>bits of register to set Powman needs a password for writes, to prevent accidentally writing to it. This function implements hw_set_bits with an appropriate password. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga268335a57afa4f047a780b0e38c43876" name="ga268335a57afa4f047a780b0e38c43876"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga268335a57afa4f047a780b0e38c43876">&#9670;&nbsp;</a></span>powman_set_debug_power_request_ignored()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void powman_set_debug_power_request_ignored </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>ignored</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Ignore wake up when the debugger is attached. </p>
<p >Typically, when a debugger is attached it will assert the pwrupreq signal. OpenOCD does not clear this signal, even when you quit. This means once you have attached a debugger powman will never go to sleep. This function lets you ignore the debugger pwrupreq which means you can go to sleep with a debugger attached. The debugger will error out if you go to turn off the switch core with it attached, as the processors have been powered off.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ignored</td><td>should the debugger power up request be ignored </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga37324a8d6e9b4416a1e8837cbca44275" name="ga37324a8d6e9b4416a1e8837cbca44275"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga37324a8d6e9b4416a1e8837cbca44275">&#9670;&nbsp;</a></span>powman_set_power_state()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int powman_set_power_state </td>
          <td>(</td>
          <td class="paramtype">powman_power_state&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the power state. </p>
<p >Check the desired state is valid. Powman will go to the state if it is valid and there are no pending power up requests.</p>
<p >Note that if you are turning off the switched core then this function will never return as the processor will have been turned off at the end.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">state</td><td>the power state to go to </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PICO_OK if the state is valid. Misc PICO_ERRORs are returned if not </dd></dl>

</div>
</div>
<a id="gaf78bad976be73c9480933d73bf358a23" name="gaf78bad976be73c9480933d73bf358a23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf78bad976be73c9480933d73bf358a23">&#9670;&nbsp;</a></span>powman_timer_disable_alarm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void powman_timer_disable_alarm </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disable the alarm. </p>
<p >Once an alarm has fired it must be disabled to stop firing as the alarm comparison is alarm = alarm_time &gt;= current_time </p>

</div>
</div>
<a id="gac8aa99d990fc2e793c2cc3ff680ce41f" name="gac8aa99d990fc2e793c2cc3ff680ce41f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac8aa99d990fc2e793c2cc3ff680ce41f">&#9670;&nbsp;</a></span>powman_timer_enable_alarm_at_ms()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void powman_timer_enable_alarm_at_ms </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>alarm_time_ms</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set an alarm at an absolute time in ms. </p>
<p >Note, the timer is stopped and then restarted as part of this function. This only controls the alarm if you want to use the alarm to wake up powman then you should use <a class="el" href="group__hardware__powman.html#ga284eb8137db4f4aa0ef21f52f2cd0f0a">powman_enable_alarm_wakeup_at_ms</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">alarm_time_ms</td><td>time at which the alarm will fire </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga4b843b70eaf83fb4b0d2fbee8ce1a015" name="ga4b843b70eaf83fb4b0d2fbee8ce1a015"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4b843b70eaf83fb4b0d2fbee8ce1a015">&#9670;&nbsp;</a></span>powman_timer_enable_gpio_1hz_sync()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void powman_timer_enable_gpio_1hz_sync </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>gpio</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Use a 1Hz external signal as the powman timer source for seconds only. </p>
<p >Use a 1hz sync signal, such as from a gps for the seconds component of the timer. The milliseconds will still come from another configured source such as xosc or lposc</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gpio</td><td>the gpio to use. must be 12, 14, 20, 22 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga7e0048a9fe486dc4e6cc6b9ae7699924" name="ga7e0048a9fe486dc4e6cc6b9ae7699924"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7e0048a9fe486dc4e6cc6b9ae7699924">&#9670;&nbsp;</a></span>powman_timer_set_1khz_tick_source_gpio()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void powman_timer_set_1khz_tick_source_gpio </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>gpio</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Use a 1KHz external tick as the powman timer source. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gpio</td><td>the gpio to use. must be 12, 14, 20, 22 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gacc08f760516b1b09a58a7121cdfc1f49" name="gacc08f760516b1b09a58a7121cdfc1f49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacc08f760516b1b09a58a7121cdfc1f49">&#9670;&nbsp;</a></span>powman_timer_set_1khz_tick_source_lposc_with_hz()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void powman_timer_set_1khz_tick_source_lposc_with_hz </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>lposc_freq_hz</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Use the low power oscillator (specifying frequency) as the powman timer source. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">lposc_freq_hz</td><td>specify an exact lposc freq to trim it </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8fb8797fc3fbc9b7e9c30c6ae316065c" name="ga8fb8797fc3fbc9b7e9c30c6ae316065c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8fb8797fc3fbc9b7e9c30c6ae316065c">&#9670;&nbsp;</a></span>powman_timer_set_1khz_tick_source_xosc_with_hz()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void powman_timer_set_1khz_tick_source_xosc_with_hz </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>xosc_freq_hz</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Use the crystal oscillator as the powman timer source. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">xosc_freq_hz</td><td>specify a crystal frequency </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaa2f30fea7e5b78efc2d89cf5e5f215ed" name="gaa2f30fea7e5b78efc2d89cf5e5f215ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa2f30fea7e5b78efc2d89cf5e5f215ed">&#9670;&nbsp;</a></span>powman_timer_set_ms()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void powman_timer_set_ms </td>
          <td>(</td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>time_ms</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set current time in ms. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">time_ms</td><td>Current time in ms </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>